﻿/*
 * FileName: Match.cs
 * Module: Core
 * Author: Gourav Das
 * Created: 04/2011
 * Modifications:
 * Copyright: Gourav Das, 2011
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using _22yards.Core;

namespace _22yards.Core
{
    public class Match
    {
        Team Team1;
        Team Team2;

        public short matchState { get; set; } //0 - Not started, 1 - InProgress, 2 - Over

        public bool TeamsDecided { get; set; }

        public short TypeOfMatch { get; set; }

        public string MatchInGroup { get; set; }

        public short AbsoluteMatchDay { get; set; }

        public short MatchTime { get; set; }

        public int StadiumID { get; set; }

        public Match(Team team1, Team team2, short typeofmatch)
        {
            Team1 = team1;
            Team2 = team2;
            TeamsDecided = true;
            TypeOfMatch = typeofmatch;
        }

        public Match (short typeofMatch, bool teamsDecided=false)
        {
            Team1 = null;
            Team2 = null;
            TeamsDecided = false;
            TypeOfMatch = typeofMatch;
        }

        public Team getTeam1()
        {
            return Team1;
        }

        public Team getTeam2()
        {
            return Team2;
        }
    }
}
